package com.dqx.haoqiu.mvp.common.config;

import android.content.Context;

import com.dqx.haoqiu.mvp.BuildConfig;
import com.dqx.haoqiu.mvp.R;

/**
 * APP配置工具类
 * <p>
 * 功能描述：API，长链接地址配置，第3方key配置
 */
public class AppConfig {
    //域名
    public static String API_BASE_URL = "";
    //长链接地址
    public static String SOCKET = "";
    //bugly的id
    public static String BUGLY_ID = "";

    /**
     * 初始化APP配置参数
     *
     * @param context
     */
    public static void initConfig(Context context) {
        API_BASE_URL = BuildConfig.DEBUG ?
                context.getResources().getString(R.string.api_offline) :
                context.getResources().getString(R.string.api_online);
        SOCKET = BuildConfig.DEBUG ?
                context.getResources().getString(R.string.socket_offline) :
                context.getResources().getString(R.string.socket_online);
        BUGLY_ID = context.getResources().getString(R.string.bugly_id);
    }
}
